package com.skzh.flightplans.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.skzh.flightplans.mapper.WaypointsMapper;
import com.skzh.flightplans.domain.Waypoints;
import com.skzh.flightplans.service.IWaypointsService;

/**
 * 航线对应坐标列Service业务层处理
 *
 * @author skzh
 * @date 2025-04-01
 */
@Service
public class WaypointsServiceImpl implements IWaypointsService {
    @Autowired
    private WaypointsMapper waypointsMapper;

    /**
     * 查询航线对应坐标列
     *
     * @param wpId 航线对应坐标列主键
     * @return 航线对应坐标列
     */
    @Override
    public Waypoints selectWaypointsByWpId(String wpId) {
        return waypointsMapper.selectWaypointsByWpId(wpId);
    }

    /**
     * 查询航线对应坐标列列表
     *
     * @param waypoints 航线对应坐标列
     * @return 航线对应坐标列
     */
    @Override
    public List<Waypoints> selectWaypointsList(Waypoints waypoints) {
        return waypointsMapper.selectWaypointsList(waypoints);
    }

    /**
     * 新增航线对应坐标列
     *
     * @param waypoints 航线对应坐标列
     * @return 结果
     */
    @Override
    public int insertWaypoints(Waypoints waypoints) {
            return waypointsMapper.insertWaypoints(waypoints);
    }

    /**
     * 修改航线对应坐标列
     *
     * @param waypoints 航线对应坐标列
     * @return 结果
     */
    @Override
    public int updateWaypoints(Waypoints waypoints) {
        return waypointsMapper.updateWaypoints(waypoints);
    }

    /**
     * 批量删除航线对应坐标列
     *
     * @param wpIds 需要删除的航线对应坐标列主键
     * @return 结果
     */
    @Override
    public int deleteWaypointsByWpIds(String[] wpIds) {
        return waypointsMapper.deleteWaypointsByWpIds(wpIds);
    }

    /**
     * 删除航线对应坐标列信息
     *
     * @param wpId 航线对应坐标列主键
     * @return 结果
     */
    @Override
    public int deleteWaypointsByWpId(String wpId) {
        return waypointsMapper.deleteWaypointsByWpId(wpId);
    }
}
